﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Combat/Combat.master" AutoEventWireup="true"
    CodeFile="StandManager.aspx.cs" Inherits="Aptitude_StandManager" StylesheetTheme="Content" %>

<%@ Register Src="../../UserContral/ListPageContral.ascx" TagName="ListPageContral"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">
        //<![CDATA][
        function CheckAll(oCheckbox) {
            var items = document.getElementsByTagName("INPUT");
            for (i = 0; i < items.length; i++) {
                if (items[i].type == "checkbox") {
                    items[i].checked = oCheckbox.checked;
                }
            }
        }
        //]]>
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table cellspacing="0" cellpadding="0" width="100%" class="intable">
        <caption>
            <span>选择单位及条件</span></caption>
        <tr>
            <td class="title" style="width: 80px">
                单位：
            </td>
            <td>
                <asp:DropDownList ID="ddlDepartment" runat="server" Width="406">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                条件：
            </td>
            <td>
                <asp:DropDownList ID="ddlRanger" runat="server" Width="406">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                考核：
            </td>
            <td>
                <asp:DropDownList ID="ddlExam" runat="server" Width="406">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="title">
                &nbsp;
            </td>
            <td>
                <asp:RadioButtonList ID="rbtContract" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Value="0" Selected="True" Text="消防官兵"></asp:ListItem>
                    <asp:ListItem Value="1" Text="合同制消防员"></asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td class="title">
            </td>
            <td>
                <ul class="topmenu">
                    <li>
                        <asp:LinkButton ID="btnSelect" runat="server" OnClick="btnSelect_Click" Text="查询" /></li>
                </ul>
            </td>
        </tr>
    </table>
    <div style="clear: both">
    </div>
    <asp:GridView ID="gvStandard" DataKeyNames="StandardID" runat="server" AutoGenerateColumns="False"
        Caption="<span>考核士兵列表</span>" AllowPaging="True" OnRowDataBound="gvStandard_RowDataBound"
        OnRowCommand="gvStandard_RowCommand" PageSize="15">
        <Columns>
            <asp:TemplateField>
                <ItemStyle Width="5%" />
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblID"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="姓名">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# GetSoldierName(Eval("SoldierID").ToString()) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="单位">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# GetFullDepartmentName(Eval("SoldierID").ToString()) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="级别">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# GetRangerName(int.Parse(Eval("RangerID").ToString())) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="PhysicalAvgScore" HeaderText="体能总分" />
            <asp:TemplateField HeaderText="技能达标情况">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Convert.ToBoolean(Eval("SkillStandard").ToString())?"全部达标":"未全部达标" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="笔试分数">
                <ItemTemplate>
                    <asp:Label ID="lblBiShi" runat="server"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="综合评定">
                <ItemTemplate>
                    <asp:Label ID="Label5" runat="server" Text='<%# GetStandard(int.Parse(Eval("Standard").ToString())) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="编辑">
                <ItemTemplate>
                    <a href="UpdateAptitudeScore.aspx?SoldierID=<%# Eval("SoldierID").ToString() %>&RangerID=<%# Eval("RangerID") %>&ExamId=<%# Eval("ExamID") %>">
                        <img alt="编辑" src="../../Images/Edit.gif"></a>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="25" />
                <HeaderStyle HorizontalAlign="Center" Width="25" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="删除">
                <ItemTemplate>
                    <asp:ImageButton runat="server" CommandArgument='<%# Eval("StandardID") %>' ID="lkbDel"
                        CommandName="Del" ImageUrl="~/Images/delete.gif" OnClientClick="return confirm('是否真的删除?')">
                    </asp:ImageButton>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="25" />
                <HeaderStyle HorizontalAlign="Center" Width="25" />
            </asp:TemplateField>
        </Columns>
        <PagerTemplate>
        </PagerTemplate>
        <RowStyle HorizontalAlign="Left" />
        <HeaderStyle HorizontalAlign="Left" />
    </asp:GridView>
    <uc1:ListPageContral ID="ListPageContral1" runat="server" PageSize="15" OnPageSizeChange="ListPageContral1_PageSizeChange" />
    <div style="clear: both">
    </div>
    <div class="prompt">
        <asp:Label ID="Prompt" runat="server"></asp:Label></div>
</asp:Content>
